
/*
 * socket_item.h
 *
 *  Created on: Sep 16, 2010
 *      Author: thienlong
 */

#ifndef SOCKET_ITEM_H_
#define SOCKET_ITEM_H_
#include <sys/socket.h>
#include <sys/types.h>

struct socket_item {
	struct next_data *next;
	int fd; /* file description */
	struct sockaddr_storage ss;
	socklen_t socklen;
};

struct socket_queue {
	struct socket_item *head;
	struct socket_item *tail;
	pthread_mutex_t lock;
	pthread_cond_t cond;
};

#endif /* SOCKET_ITEM_H_ */
